#!/bin/bash
sum=0
mem=`ps aux | awk '{print $6}' | grep -v 'RSS'`
sum=`echo $mem | xargs | sed 's/ /+/g' | bc`
#for mem in `ps aux | awk '{print $6}' | grep -v 'RSS'`
#do
#    sum=$[$sum+$mem]
#done
echo "Total Memary is $sum"
